package com.mjx.springcloud.config.client;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Jo on 2017/5/7.
 */
@SpringBootApplication
@RestController
public class Application {

    @Value("${driverClassName:未获取到}")
    String driverClassName;

    @Value("${user:未获取到}")
    String user;

    @Value("${password:未获取到}")
    String password;

    @Value("${url:未获取到}")
    String url;

    @RequestMapping("/")
    String getConfig(){
        StringBuilder  sb = new StringBuilder();
        sb.append("driverClassName:" + driverClassName +"<br>");
        sb.append("user:" + user + "<br>");
        sb.append("password:" + password + "<br>");
        sb.append("url:" + url + "<br>");
        return sb.toString();
    }

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
